﻿<UserControl x:Class="SegmentDisplay.TestPanel.TestPanelControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:colors="clr-namespace:SegmentDisplay.Common;assembly=SegmentDisplay.Common"
             xmlns:digit07="clr-namespace:SegmentDisplay.Common.Digit07;assembly=SegmentDisplay.Common"
             xmlns:digit09="clr-namespace:SegmentDisplay.Common.Digit09;assembly=SegmentDisplay.Common"
             xmlns:digit14="clr-namespace:SegmentDisplay.Common.Digit14;assembly=SegmentDisplay.Common"
             xmlns:digit16="clr-namespace:SegmentDisplay.Common.Digit16;assembly=SegmentDisplay.Common"
             xmlns:Date="clr-namespace:SegmentDisplay.Custom.Date;assembly=SegmentDisplay.Custom"
             xmlns:Time="clr-namespace:SegmentDisplay.Custom.Time;assembly=SegmentDisplay.Custom"
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="1400">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/SegmentDisplay.Common;component/Themes/Generic.xaml" />
                <ResourceDictionary Source="pack://application:,,,/SegmentDisplay.Custom;component/Themes/Generic.xaml" />

            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid Background="Black">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />

            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Grid Grid.Row="0" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Date:IndicatorDate Grid.Column="0" IsSwitchOn="True" Margin="10"
                                
                            LightOn="{Binding Source={x:Static Member=colors:SegmentBrushes.LiquidCrystalLightOn} }"
                            LightOff="{Binding Source={x:Static Member=colors:SegmentBrushes.LiquidCrystalLightOff} }"
                            Value="{Binding CurrentTime}"
                            Style="{StaticResource IndicatorDateStyle}"
                            DigitStyle="{StaticResource SegmentDigit07Style}"
                            SeparatorStyle="{StaticResource SegmentDotStyle}"
                            />
            <Date:IndicatorDate Grid.Column="1" IsSwitchOn="True" Margin="10"
                            LightOn="{Binding Source={x:Static Member=colors:SegmentBrushes.YellowLightOn} }"
                            LightOff="{Binding Source={x:Static Member=colors:SegmentBrushes.YellowLightOff} }"
                            Value="{Binding CurrentTime}"
                            Style="{StaticResource IndicatorDateStyle}"
                            DigitStyle="{StaticResource SegmentDigit07Style_1}"
                            SeparatorStyle="{StaticResource SegmentDotStyle}"
                            />
            <Date:IndicatorDate Grid.Column="2" IsSwitchOn="True" Margin="10"
                            LightOn="{Binding Source={x:Static Member=colors:SegmentBrushes.RedLightOn} }"
                            LightOff="{Binding Source={x:Static Member=colors:SegmentBrushes.RedLightOff} }"
                            Value="{Binding CurrentTime}"
                            Style="{StaticResource IndicatorDateStyle}"
                            DigitStyle="{StaticResource SegmentDigit07Style_2}"
                            SeparatorStyle="{StaticResource SegmentDotStyle}"
                            />

        </Grid>

        <Grid Grid.Row="1" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Time:IndicatorTime Grid.Column="0" IsSwitchOn="True" Margin="10"
                            LightOn="{Binding Source={x:Static Member=colors:SegmentBrushes.BlueLightOn} }"
                            LightOff="{Binding Source={x:Static Member=colors:SegmentBrushes.BlueLightOff} }"
                            Value="{Binding CurrentTime}"
                            Style="{StaticResource IndicatorTime07Style}" 
                            DigitStyle="{StaticResource SegmentDigit07Style}"
                            SeparatorStyle="{StaticResource SegmentColonStyle}"
                            />
            <Time:IndicatorTime Grid.Column="1" IsSwitchOn="True" Margin="10"
                            Value="{Binding CurrentTime}"
                            Style="{StaticResource IndicatorTime07Style}" 
                            DigitStyle="{StaticResource SegmentDigit07Style_1}"
                            SeparatorStyle="{StaticResource SegmentColonStyle}">
                <Time:IndicatorTime.BitmapEffect>
                    <DropShadowBitmapEffect Color="GreenYellow" 
                                            Direction="10" Opacity="0.7"
                                            ShadowDepth="0" 
                                             />
                </Time:IndicatorTime.BitmapEffect>
            </Time:IndicatorTime>
            <Time:IndicatorTime Grid.Column="2" IsSwitchOn="True" Margin="10"
                            Value="{Binding CurrentTime}"
                            Style="{StaticResource IndicatorTime07Style}" 
                            DigitStyle="{StaticResource SegmentDigit07Style_2}"
                            SeparatorStyle="{StaticResource SegmentColonStyle}"
                            />
        </Grid>
        
        <Grid Grid.Row="2" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Time:IndicatorTime Grid.Column="0" IsSwitchOn="True" Margin="10"
                            Value="{Binding CurrentTime}"
                            Style="{StaticResource IndicatorTime09Style}" 
                            DigitStyle="{StaticResource SegmentDigit09Style}"
                            SeparatorStyle="{StaticResource SegmentColonStyle}"
                            />
            <Time:IndicatorTime Grid.Column="1" IsSwitchOn="True" Margin="10"
                            Value="{Binding CurrentTime}"
                            Style="{StaticResource IndicatorTime14Style}" 
                            DigitStyle="{StaticResource SegmentDigit14Style}"
                            SeparatorStyle="{StaticResource SegmentColonStyle}"
                            >
                <Time:IndicatorTime.BitmapEffect>
                    <BlurBitmapEffect Radius="3" KernelType="Gaussian"/>
                </Time:IndicatorTime.BitmapEffect>
            </Time:IndicatorTime>
            
            <Time:IndicatorTime Grid.Column="2" IsSwitchOn="True" Margin="10"
                            Value="{Binding CurrentTime}"
                            Style="{StaticResource IndicatorTime16Style}" 
                            DigitStyle="{StaticResource SegmentDigit16Style}"
                            SeparatorStyle="{StaticResource SegmentColonStyle}"
                            >
                <Time:IndicatorTime.LightOn>
                    <LinearGradientBrush>
                        <GradientStop Color="Yellow" Offset="0.0" />
                        <GradientStop Color="Orange" Offset="0.5" />
                        <GradientStop Color="Red" Offset="1.0" />
                    </LinearGradientBrush>
                </Time:IndicatorTime.LightOn>
                <Time:IndicatorTime.LightOff>
                    <LinearGradientBrush>
                        <GradientStop Color="Black" Offset="0.0" />
                        <GradientStop Color="DarkGray" Offset="1.0" />
                    </LinearGradientBrush>
                </Time:IndicatorTime.LightOff>
            </Time:IndicatorTime>

        </Grid>
    </Grid>
</UserControl>
